package cn.wolfcode.crm.exception;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice //控制器增强器
public class ExceptionControllerAdvice {

    @ExceptionHandler(RuntimeException.class)
    public String handlException(RuntimeException e, Model model) {
        return "404";
    }
}
